<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/tld/authority.tld" prefix="authority" %>
<%@ taglib uri="/tld/navigator.tld" prefix="navigator" %>
<%@ taglib uri="/tld/pagination.tld" prefix="page" %>

<div class="pageheader">
    <h2>日志管理</h2>

    <div class="breadcrumb-wrapper">
        <span class="left color-999 font13">您当前的位置：</span>
        <ol class="breadcrumb left">
            <li>系统管理</li>
            <li>日志管理</li>
        </ol>
    </div>
</div>
<%--<navigator:navigator url="operationLog/query.htm"/>--%>

<div class="contentpanel">

    <div class="panel panel-default">
        <form>
            <input type="hidden" name="start" value="${query.start}">
            <input type="hidden" name="length" value="${query.length}">
            <input type="hidden" name="showType" value="${query.showType}">

            <div class="row">
                <div class="panel-body panel-body2 border-gray-b">
                    <div class="col-md-7">
                        <div class="form-group input-group">
                            <div class="select-container select select-container50 input-group-btn col-dm-3">
                                <a class="select-choice">
                                    <span>操作人</span>
                                </a>
                            </div>
                            <input class="form-control form-control2" type="text" name="managerName" value="${query.managerName}" placeholder="请输入查询关键词">
                        </div>
                    </div>
                    <div class="btn-group2 left">
                        <button type="submit" class="btn btn-primary btn-4-query"><i class="icon icon-chaxun"></i>查询</button>
                    </div>
                </div>
            </div>

            <div class="row pt15 condition-4-query" style="display: ${query.showType == 0 ? 'none;' : 'block;'}">
                <div class="panel-body">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">日志类型：</label>
                            <div class="col-sm-6">
                                <div class="select-container select select-container50 input-group-btn col-dm-3">
                                    <select class="select select-offscreen" name="type">
                                        <option value="">全部</option>
                                        <option value="0" ${query.type == 0 ? 'selected' : ''}>新增</option>
                                        <option value="1" ${query.type == 1 ? 'selected' : ''}>修改</option>
                                        <option value="2" ${query.type == 2 ? 'selected' : ''}>删除</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-8">
                        <div class="form-group before-after-none" style="display:table; width:100%;">
                            <label class="col-sm-2 control-label control-label2">日志时间：</label>

                            <div class="col-sm-6 dated-time">
                                <div class="select-container select">
                                    <a class="select-choice">
                                        <input type="text" class="input-border-0" name="minCreated"
                                               id="minCreated"
                                               onclick="laydate({elem: '#minCreated'})"
                                               value="<fmt:formatDate value="${query.minCreated}" pattern="yyyy-MM-dd"/>">
                                        <i class="icon icon-riqi" onclick="laydate({elem: '#minCreated'})"></i>
                                    </a>
                                </div>
                            </div>
                            <span class="dated-time-jiange"><b>-</b></span>

                            <div class="col-sm-6 dated-time dated-time2">
                                <div class="select-container select">
                                    <a class="select-choice">
                                        <input type="text" class="input-border-0" name="maxCreated"
                                               id="maxCreated"
                                               onclick="laydate({elem: '#maxCreated'})"
                                               value="<fmt:formatDate value="${query.maxCreated}" pattern="yyyy-MM-dd"/>">
                                        <i class="icon icon-riqi" onclick="laydate({elem: '#maxCreated'})"></i>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
        <div class="row">
            <div class="shrink ${query.showType == 0 ? '': 'active'}">
                <button type="button" class="shrink-btn btn-default btn-4-toggle">
                    <i class="icon icon-xiala1"></i>
                    <span>${query.showType == 0 ? '展开查询条件': '收起查询条件'}</span>
                </button>
            </div>
        </div>
    </div>

    <div class="panel panel-default">

        <div class="row">
            <div class="panel-body panel-body2  plr20">

                <div class="left">
                    <div class="btn-group left btn-group-none2">
                        <%--<authority:authority url="/operationLog/delete">--%>
                            <button class="btn btn-danger btn-4-batch-delete"><i class="icon icon-shanchu"></i>批量删除</button>
                        <%--</authority:authority>--%>
                    </div>
                </div>
            </div>
        </div>

        <%--Table--%>
        <div class="row">
            <div class=" plr20">
                <div class="table-responsive">
                    <table class="table dataTable">
                        <tbody>
                        <tr>
                            <th style="width: 50px;"><input class="multipartCheckALL" type="checkbox"></th>
                            <th style="width: 8%;"><strong>操作人</strong></th>
                            <th style="width: 5%;"><strong>类型</strong></th>
                            <th><strong>日志内容</strong></th>
                            <th style="width: 10%;"><strong>日志时间</strong></th>
                            <th style="width: 5%;"><strong>操作</strong></th>
                        </tr>
                        <c:forEach items="${paging.items}" var="item">
                            <tr>
                                <th><input class="multipartCheckONE" type="checkbox" name="id" value="${item.id}"></th>
                                <td>${item.managerName}</td>
                                <td>
                                    <c:choose>
                                        <c:when test="${item.type == 0}">新增</c:when>
                                        <c:when test="${item.type == 1}">修改</c:when>
                                        <c:when test="${item.type == 2}">删除</c:when>
                                    </c:choose>
                                </td>
                                <td>${item.content}</td>
                                <td><fmt:formatDate value="${item.created}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                                <td>
                                    <%--<authority:authority url="/operationLog/delete">--%>
                                        <a class="btn-4-delete margin-l-10" data-id="${item.id}">删除</a>
                                    <%--</authority:authority>--%>
                                </td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
                <page:page pageIndex="${paging.pageIndex}" pageSize="${paging.pageSize}" count="${paging.count}"/>
            </div>
        </div>
    </div>
    <script src="js/system/operation-log-List.js" charset="UTF-8"></script>
</div>